1. Field of the Invention
The present invention relates to a key assigner for an electronic musical instrument, and more particularly to a technique for assigning tone channels to play music with natural sounding tonal qualities.
Recently, electronic musical instruments, such as electronic organs and electronic pianos, have been developed and are in practical use. Such electronic musical instruments generally have multiple tone channels to simultaneously produce a plurality of musical tones in response to the depression of multiple keys. In tone generation processing, electronic musical instruments employ their key assigners to determine along which tone channels musical tones corresponding to the respective depressed keys will be generated.
Generally, electronic musical instruments produce musical tones having timbres similar to those of various musical instruments. For example, by designating timbres in consonance with key ranges, electronic musical instruments can simultaneously produce musical tones with multiple timbres, such as attenuated tones similar to those produced by pianos and sustained tones similar to those produced by violins, on a single keyboard.
As electronic musical instruments have limited tone channels, however, the number of musical tones that can simultaneously be produced is also limited. To accomplish simultaneous tone production, a key assigner is utilized to select, from among those that are available, the tone channels along which musical tones are to be halted and those along which musical tones are to be generated. Since musical fidelity can be significantly deteriorated by the random assignment to tone channels of musical tones for keys, improved processing control is desirable.
2. Description of the Related Art
A process performed by a conventional key assigner for an electronic musical instrument will now be described while referring to the accompanying drawings.
FIG. 6 is used to illustrate the employment of an assignment table during a key assigning process.
The "No." column holds the tone channel numbers (ten tone channels, "1" to "10", are used in this example). The "RANK" column holds the priority level values assigned to the tone channels. These priority level values are the data that are used to determine the order in which tone channels are selected for tone generation halt when such processing is required. "20" is the maximum priority level value.
The "ON/OFF" column entries are employed to indicate which tone channels are being used. A tone channel for which an "ON" is entered is being used (key-ON), while a tone channel for which an "OFF" is entered is not being used (key-OFF).
A key assigning process using the above described assignment table will now be explained while referring to the flowchart shown in FIG. 5.
When tone generation is instructed by a processor (not shown), all of the tone channel priority level values in the assignment table are lowered by "1" (step S40). In other words, all the values that are entered in the "RANK" column are decremented by one. It should be noted that "0" is the lowest level to which these values are reduced.
Subsequently, a check is performed to determine whether there are any tone channels that have key-OFF entries (step S41). This determination is performed by examining the entries in the ON/OFF column of the assignment table. In the example shown in FIG. 6A, tone channels No. 1 through No. 4 are not being used. When tone channels with key-OFF entries are found, a comparison process is performed to determine which of these tone channels has the lowest priority level value (step S42).
Following this, a new priority level value, "20", is written into the RANK column of the assignment table for the selected tone channels, as is illustrated by the entries for tone channels No. 1 and No. 2 in FIG. 6B (step S44). The entries in the ON/OFF column for the affected tone channels are also updated to "ON". Tone generation is thereafter performed in agreement with the updated contents of the assignment table (step S45).
When, at step S41, no tone channels with key-OFF entries are found, the tone channel in the assignment table that has the lowest priority level value is selected, and the production of musical tones along that tone channel is halted (step S43). The example in FIG. 6C represents an instance where all tone channels are being used. In this case, tone channels No. 5 and No. 6 are identified as the tone channels that have the lowest priority level value and musical tones along these tone channels are halted.
Then, as is shown in FIG. 6D, a new priority level value, "20", is written in the priority column in the assignment table for the tone channels, No. 5 and No. 6, that were selected (step S44). Tone generation is thereafter performed in agreement with the updated contents of the assignment table (step S45).
As described above, when tone generation is newly instructed, a conventional key assigner uniformly lowers the priority level values of all the tone channels. If at this tinge there are any tone channels that are not in use, the maximum priority level value is entered for one of the tone channels, the one that has the lowest priority level value, and musical tones are generated along that tone channel.
If all the tone channels are being used, musical tones along the tone channel that has the lowest priority level value are halted. That tone channel is then newly designated for tone generation and is assigned the maximum priority level value. During this process, therefore, musical tones along the selected tone channel are halted regardless of whether they are attenuated tones or sustained tones.
That is, if a sustained tone is selected as the musical tone to be halted (i.e., its priority level value is the lowest), even though the key that controls the sustained tone is depressed, that tone is accordingly halted, and musical fidelity is impaired.